package com.lantosec.hmrp.modules.revisit.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.Date;
import java.util.List;

import com.lantosec.hmrp.modules.revisit.entity.HisPatientInfo;
import com.lantosec.hmrp.modules.revisit.entity.RevisitTask;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 回访任务 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="RevisitTask对象", description="回访任务")
public class RevisitTaskVO extends BaseVO<RevisitTask> {
    private static final long serialVersionUID = 1L;


    public RevisitTaskVO(RevisitTask entity){
        this.revisitTaskId = entity.getRevisitTaskId();
        this.deptId = entity.getDeptId();
        this.userId = entity.getUserId();
        this.patientId = entity.getPatientId();
        this.outTime = entity.getOutTime();
        this.revisitTimeStd = entity.getRevisitTimeStd();
        this.doctorState = entity.getDoctorState();
        this.nurseState = entity.getNurseState();
    }

    @Override
    public RevisitTask convertToEntity(){
        return new RevisitTask(this);
    }


    @ApiModelProperty(value = "回访任务ID")
    @TableId(value = "revisit_task_id", type = IdType.AUTO)
    private Integer revisitTaskId;

    @ApiModelProperty(value = "出院科室ID")
    private String deptId;

    @ApiModelProperty(value = "主管医生ID")
    private String userId;

    @ApiModelProperty(value = "患者ID")
    private String patientId;

    @ApiModelProperty(value = "出院时间")
    private Date outTime;

    @ApiModelProperty(value = "回访时间期限")
    private String revisitTimeStd;

    @ApiModelProperty(value = "主管医生回访状态(0待回访 1已回访 2超时回访)")
    private Integer doctorState;

    @ApiModelProperty(value = "护士回访状态(0待回访 1已回访 2超时回访)")
    private Integer nurseState;

    @ApiModelProperty(value = "部门名称")
    private String deptName;
    @ApiModelProperty(value = "主管医生名称")
    private String name;
    @ApiModelProperty(value = "出院患者信息")
    private HisPatientInfo hisPatientInfo;
    @ApiModelProperty(value = "回访状态")
    private Integer state;
}
